home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / SASETUP.MSI / F77549_ots_task.asp < prev    next >
Encoding:
Text File  |  2003-02-21  |  2.6 KB  |  104 lines

  1. <%    '==================================================
  2.     ' Module:    ots_task.asp
  3.     '
  4.     ' Synopsis:    Object Task Selector Task Formatting Functions
  5.     '
  6.     ' Copyright (c) Microsoft Corporation.  All rights reserved.
  7.     '================================================== %>
  8. <%
  9.  
  10. '
  11. ' --------------------------------------------------------------
  12. ' T A S K   O B J E C T
  13. ' --------------------------------------------------------------
  14. '
  15. Const OTS_TASK_DIM                = 5
  16. Const OTS_TASK_TASK                = 0
  17. Const OTS_TASK_DESC                = 1
  18. Const OTS_TASK_LINK                = 2
  19. Const OTS_TASK_PAGE_TYPE        = 3
  20. Const OTS_TASK_FUNCTION            = 4
  21.  
  22. '
  23. ' Task Page types
  24. '
  25. Const OTS_PAGE_TYPE_NEW_PAGE = 0
  26. Const OTS_PT_NEW_WINDOW = 0
  27.  
  28. Const OTS_PAGE_TYPE_STANDARD_PAGE = 1
  29. Const OTS_PT_AREA = 1
  30.  
  31. Const OTS_PAGE_TYPE_SIMPLE_PROPERTY = 2
  32. Const OTS_PT_PROPERTY = 2
  33.  
  34. Const OTS_PAGE_TYPE_TABBED_PROPERTY = 3
  35. Const OTS_PT_TABBED_PROPERTY = 3
  36.  
  37. Const OTS_PAGE_TYPE_WIZARD_PROPERTY = 4
  38. Const OTS_PT_WIZARD = 4
  39.  
  40. Const OTS_PAGE_TYPE_RAW = 5
  41. Const OTS_PT_RAW = 5
  42.  
  43.  
  44. ' --------------------------------------------------------------
  45. ' Function:    OTS_CreateTaskEx
  46. '
  47. ' Synopsis:    Create a new task
  48. ' Arguments: [in] Task text
  49. '            [in] Description of what the task contains
  50. '            [in] Task link
  51. '            [in] Page Type
  52. '            [in] Task Function
  53. '
  54. ' Returns:    The Table object
  55. '
  56. ' --------------------------------------------------------------
  57. Public Function OTS_CreateTaskEx(ByVal Task, ByVal TaskDescription, ByVal TaskHLink, ByVal PageType, ByVal TaskFn)
  58.     Dim TaskItem()
  59.     ReDim TaskItem(OTS_TASK_DIM)
  60.  
  61.     SA_ClearError()
  62.  
  63.     TaskItem(OTS_TASK_TASK) = Task
  64.     TaskItem(OTS_TASK_DESC) = TaskDescription
  65.     TaskItem(OTS_TASK_LINK) = TaskHLink
  66.     TaskItem(OTS_TASK_PAGE_TYPE) = PageType
  67.     TaskItem(OTS_TASK_FUNCTION) = TaskFn
  68.  
  69.     OTS_CreateTaskEx = TaskItem
  70.     
  71. End Function
  72.  
  73. Public Function OTS_CreateTask(ByVal Task, ByVal TaskDescription, ByVal TaskHLink, ByVal PageType)
  74.  
  75.     OTS_CreateTask = OTS_CreateTaskEx(Task, TaskDescription, TaskHLink, PageType, "OTS_TaskAlways")
  76.     
  77. End Function
  78.  
  79.  
  80. ' --------------------------------------------------------------
  81. ' Function:    OTS_IsValidTask
  82. '
  83. ' Synopsis:    Check to see if the supplied object is a valid task
  84. '            object
  85. ' Arguments: [in] Task text
  86. '
  87. ' Returns:    True if Task is valid, false otherwise.
  88. '
  89. ' --------------------------------------------------------------
  90. Public Function OTS_IsValidTask(ByRef Task)
  91.     OTS_IsValidTask = false
  92.     If (IsArray(Task)) Then
  93.         If (UBound(Task) = OTS_TASK_DIM) Then
  94.             OTS_IsValidTask = true
  95.         End If
  96.     End If    
  97. End Function
  98.  
  99. %>
  100.